--[[
	function: 检查token是否失效
	author: jim_sun
    wiki: 
    api:
    example:
        curl 'URI/user_account/check_token?token=xxxxxxxxx' 
        return
        {
            "status":1,
            "errcode":"",
            "msg":"",
            "data":{
                "user_id":"123456"
            },
        }

]]
local args = ngx.req.get_uri_args()
local token = args.token
local user_id = nil

if not common_util.check_args(1, token) then
    common_util.exit(200, 0, nil, "101", "token is missing")
end

user_id = common_util.get_user_id_by_token(token)
if not user_id then
    common_util.exit(200, 0, nil, "105", "token is ....")
end

common_util.exit(200, 1, {["user_id"] = user_id}, "", "")


